perm filename APE.ME[UP,DOC]1 blob sn#002767 filedate 1972-09-22 generic text, type T, neo UTF8
















                  READING THE ASSOCIATED PRESS NEWS




                           By Martin Frost

                              22 Sep 72






        ABSTRACT:

        We have  a line from  the Associated Press  (AP) over
        which  we  get national  and  international  news (no
        local  news).  The  line is  read by  a  program that
        takes incoming  news stories and  files them  away on
        the disk,  keeping about 24  hours' worth of  news on
        file at any given time.  This document  (which exists
        as  the  file  APE.ME[UP,DOC])  describes   usage  of
        programs that allow access to the AP news.
22 Sep 72                      AP News                         Page 1


We  have a  line from  the Associated  Press (AP)  over which  we get
national and international news (no local news).  The line is read by
a program that takes incoming news stories and files them away on the
disk, keeping  about 24  hours' worth of  news on  file at  any given
time.   This  document  (which  exists  as  the  file APE.ME[UP,DOC])
describes usage of programs that allow access to the AP news.

For use in  reading the news, there  are two programs on  the system.
The first of these is HOT, which is a very small program  that simply
types out the stories as they  come in (at a somewhat slow rate  of 6
2/3 characters/sec).   The second program  is APE, which  enables the
user to read selectively the news that is on file.

To use  the hot line,  simply type the  monitor command: R  HOT.  The
program  should  type  back:  "...Associated  Press  news...";  if it
doesn't, then  it is  having trouble  contacting the  program [-AP-],
which listens to the AP line.  In this case, the program will try for
thirty seconds to  contact [-AP-], after which  time it will  give up
and tell you so.   After "...Associated Press news..." is  typed out,
you will get whatever news  is coming in.  (There are  times, usually
of only a few  minutes duration, when no  news is coming in;  at such
times, HOT will  of course type out  nothing.) WARNING: Typing  ↑C or
holding the typeout while the  news is coming in will  probably cause
HOT to miss some characters.   If that happens, your job  number will
be scratched from the list  of jobs getting the hotline news;  so you
will have to restart HOT.

From  time  to time,  you  may get  stuff  from HOT  that  looks like
garbage; in fact, it IS garbage resulting apparently from  a hardware
problem with  the teletype  line over which  the stories  come.  When
this happens, it  will eventually correct  itself, but this  may take
anywhere from a few seconds to an hour.

Now before describing the second program (APE), I will explain  a few
things  about  AP news  stories.   First  of all,  each  story  has a
sequence number which comes at the beginning of the story and  a date
and time that come at the end.  The sequence numbers start over every
day,  with the  first  story that  comes after  midnight  EST getting
number 001.  The time at the end of each story is the approximate New
York time when the story was sent over the wire.

Every twelve  hours (at  noon and at  midnight EST)  there is  a news
digest that  summarizes the stories  that are known  to be  coming in
over the next twelve hours.  The digest at midnight is  usually story
number 002 and the one  at noon usually number 202.  The  digests are
(usually) not categorized;  to get them you  must use one of  the two
methods described in paragraph 1 under SPECIAL FEATURES.
22 Sep 72                      AP News                         Page 2


Every day there are many stories that are corrections or additions to
previous stories.   We (usually)  link up such  a follow-up  with the
original and treat the  resultant combination as one  story, although
it may  be made up  of two, three,  or even more  separately numbered
stories.  Any attempt  to retrieve the  original story with  APE will
result in retrieval  of all follow-ups also.   (A long story  will be
broken up  into smaller  parts by the  Associated Press;  the smaller
parts are called TAKES and each gets its own sequence number.  We try
to link all takes of the same story together just like  additions and
corrections.  Sometimes,  however, a take  gets linked to  some other
story.)



                The Associated Press Extractor (APE)


The program that is used  to retrieve news is called APE.   It allows
quick access  to the  stories (without searching)  because of  a data
structure that  is continually being  updated by other  programs.  As
each story comes in over the AP wire, it is catagorized  by keywords;
for each keyword a list is  kept of all the stories that  word occurs
in.  To  access the news,  you select the  keyword or  combination of
keywords that  you wish  to read about.   A keyword  can be  either a
single word (or number) or a sequence of words (and/or numbers).  For
example, the following are some possible keywords: WELFARE,  WAR, SAN
FRANCISCO,  UNITED  STATES,  UNION  OF  SOVIET  SOCIALIST  REPUBLICS,
PDP 10, etc.

(The list  of keywords  contains right now  about 1000  words, mostly
people's names and names of places (cities, states, countries).  This
list is expandable, and if you have any words you would like added to
the list, SEND a note to ME.  To see a list of the keywords, TYPE the
file WORDS.SRT[AP,SYS] or SPOOL the file WORDS.LST[AP,SYS].)



                         Keyword Expressions


To  retrieve stories  using APE,  you type  in a  KEYWORD EXPRESSION,
which  may be  either a  single keyword  or an  expression containing
keywords and the operators +, -, and *.  Each keyword  represents the
set of all the stories it occurs in.  And the operators represent the
set operations  UNION (+), INTERSECTION (*), and  SET DIFFERENCE (-),
which  are  performed  on  the sets  of  stories  which  the keywords
represent.  Thus, if you want all stories that mention both Nixon and
22 Sep 72                      AP News                         Page 3


McGovern, you  should type  the keyword  expression "NIXON*MCGOVERN".
The precedence of  operators is the  normal one:  *  takes precedence
over +  and -,  which have equal  precedence.  Operations  which have
equal precedence are evaluated  from left to right.   Parentheses may
be used freely in keyword expressions.  Note that + and -  are BINARY
operators only.

        To clarify all this a little, here are a few examples:

       Keyword Expression                        Meaning

---------------------------------    --------------------------------

(NIXON-WALLACE+MCGOVERN)*ELECTION    All  stories  that  mention both
                                     ELECTION  and  either  (1) NIXON
                                     and not WALLACE or  (2) MCGOVERN
                                     (and possibly WALLACE).

ELECTION-NIXON-WALLACE-MCGOVERN      All    stories    that   mention
                                     ELECTION  but that  mention none
                                     of NIXON, WALLACE and MCGOVERN.

SAN FRANCISCO+LOS ANGELES-WAR        All stories that  mention either
                                     SAN  FRANCISCO  or  LOS ANGELES,
                                     but not WAR.

Note: Spaces are needed only to separate individual words of multiple
word keywords, but they may be used anywhere except in the  middle of
a word or special form.



                             Running APE


To run APE, type the monitor  command: R APE.  When APE starts  up it
reads in various files, and it is possible that another  program will
have hold of  one of those  files.  In that  case, APE will  say "One
moment please..." and  will wait until it  can grab the  file.  After
all  the files  have been  read in,  APE will  respond  with "KEYWORD
EXPRESSION:"; you should then type in a keyword expression as defined
in the  last section.   APE will  count the  stories that  match your
expression and tell you how many stories it found, such as:

                005 news item(s) found.  Read which one(s)?

At this point, you can  select any contiguous group from  the stories
22 Sep 72                      AP News                         Page 4


found.   For example,  you can  read the  oldest 4  stories  of those
matching your  keywords, or  you can read  the newest  3, or  the 2nd
through the 4th, or all of  them, or none of them, etc.  And  you can
have the  sublist of stories  you select typed  out only, or  you can
have the option of spooling them and/or saving them in a file on your
disk area.  The list below  explains the various ways of  making your
selection; after the list are some examples.

------------

To select all the stories in normal order (newest story  first), type
   nothing (blank line).
To select None of the stories, type "N" (for None).
To select the k newest stories in normal order, type the number "k".
To select the k oldest stories in normal order, type the number "-k".
To select the jth story through the kth story, type "j:k".  Note that
   in  this  construction  "1" represents  the  newest  story, larger
   numbers represent older stories, "*" represents the  oldest story,
   and finally, "-k" represents the kth oldest story.  Thus,  "-1" is
   equivalent to "*"; both  represent the oldest story.   The stories
   will come  out in the  order you specify:  story j first,  story k
   last.
To reverse the  order in which the  stories come out, begin  the line
   with "=".
To have only the first few lines of each story you select  typed out,
   type an "F"  (for Fast) at the  beginning of the line.   (When you
   use both the "F" and the "=" features, their order  is arbitrary.)
   When you say "F", you cannot spool or save the stories in a file.
THE SELECTION LINE YOU TYPE SHOULD END WITH EITHER A  CARRIAGE RETURN
   OR A  LINEFEED.  CARRIAGE RETURN  will cause the  selected stories
   just to be typed out.   LINEFEED will give you the chance  to save
   the stories in a file  and/or spool them, in addition  to possibly
   having them typed out.

Here are some story sublist selection examples.


      2    The newest two stories.

     -2    The oldest two stories.

     =2    The newest two stories in chronological order.
           (Normal order is reverse chronological order.)

    =-2    The oldest two stories in chronological order.

     F2    The first few lines of each of the two newest stories.
22 Sep 72                      AP News                         Page 5


    *:5    The oldest story through the 5th newest story.

    5:2    The 2nd newest story through the 5th newest in
           chronological order.

   =2:5    Same as 5:2.

    2:2    The only way to get just the 2nd newest story.

  -2:-5    The 2nd oldest story through the 5th oldest.

      =    All the stories in chronological order.

------------



                   GETTING FILE AND SPOOLER OUTPUT


If you end your story  selection line with a linefeed, you  will then
be asked:

        Direct the news where? (Tty, Spooler, and/or File).

Your  response to  this  question should  be any  combination  of the
letters T, S,  and F, in any  order, with or without  any intervening
delimiters, and followed  by a carriage  return.  If you  simply type
carriage return, then nothing will be done with the stories that were
selected, and you will  be asked for another keyword  expression.  If
you ask APE to  save the stories in a  file, you will be asked  for a
file name  without an extension;  the extension .AP  will be  used on
your file.  APE will make sure the file you specify does  not already
exist on your area  before the stories are  filed in it.  If  you ask
for the  stories to  be spooled  but not  saved in  a file,  APE will
create a file with a  name like $NEWS0.AP, which will be  spooled and
then deleted.
22 Sep 72                      AP News                         Page 6



                          SPECIAL FEATURES


1. In  addition to  normal English  keywords, there  are  two special
forms  that  can  be  used as  keywords  in  expressions.   The first
consists of a period (.) followed by an unsigned integer, eg., ".18";
if k is  the integer following the  period, this form  represents the
set of the  newest k stories that  have come in.  The  second special
form consists of a number  sign (#) followed by an  unsigned integer;
this form represents all the  stories that have the given  integer as
their  AP sequence  number.  This  feature is  especially  useful for
reading the AP news digests because they are not categorized  at all.
The  only  way to  get  them is  to  use one  of  the  special forms.
(Actually,  stories  #1,  #2,   #201  and  #202  are  the   ones  not
categorized; occassionally the digest has some other  sequence number
so  it  gets  categorized.)   Here  are  some  examples   of  keyword
expressions using these special forms.

                CHESS * .10          Among the last 10  stories  that
                                     have  come  in,  all  those that
                                     mention CHESS.

                #2 + #202            All stories with either of these
                                     sequence numbers. (These are the
                                     usual  sequence  numbers  of the
                                     news digests.)

2. The null keyword expression (that is, typing just  CARRIAGE RETURN
without  any  keywords)  has  a special  value:  the  set  of stories
corresponding  to  the  last  keyword  expression  you  typed.  These
stories constitute  your CURRENT STORY  LIST.  With this  feature you
can get back a second time the stories you just looked at.   In fact,
this feature can  be used consecutively  any number of  times, giving
the same stories every time.

3. Typing ALTMODE  in place  of a keyword  expression will  cause the
last sublist  of stories  you selected  to be  automatically selected
again; and  you will  be asked where  you want  those stories  to go.
This feature does not disturb your current story list from  which you
selected some or  all as a sublist.   And again, this feature  can be
used over  and over again,  giving the same  sublist of  stories each
time.

4. A keyword expression may be continued over several  lines.  Simply
type a LINEFEED anywhere except in the middle of a word and  APE will
type a carriage return  and a colon (:) and  wait for you to  type in
more of the expression.
22 Sep 72                      AP News                         Page 7


5. Your current story list  can be modified without typing  again the
keywords you used to get it.  If a keyword expression starts  with +,
-, or  *, the  missing (first) operand  is taken  to be  your current
story list.  For example, if  you have typed in "NIXON" as  your last
keyword  expression,  you  can  type  in  "*VIETNAM"  as   your  next
expression and you will get only stories that mention both  NIXON and
VIETNAM.

6. When stories are typed  out or written in  a file, a row  of stars
(*'s) is placed between stories.  Note that corrections and additions
to a story are considered part  of that story; thus they will  not be
separated from it by a row of stars.

7. If you type ↑O ([ESC] O on Stanford displays) during typeout  of a
story, the  typeout will  be stopped  (as usual),  but will  start up
again with the next story (if any).

8. If you type  ↑C and then the  system REEnter command, APE  will be
back to  asking for keywords,  and your current  story list  and your
current sublist will  not have been changed.   (That is, you  can get
either  of   them  by   typing  just   carriage  return   or  altmode
respectively.   See  above  for those  special  features.)   The same
effect can be gotten on Stanford displays by typing merely [ESC] I.

9. Upper and lower case characters are always equivalent.



                                NOTES


First,  the news  is kept  in  a fixed  size file.   This  means that
occasionally an old story must be deleted to make room for a new one.
If this happens after you start APE, and if you attempt to  read such
a deleted story, then you will get a message something like "1 OF THE
STORIES WENT AWAY--SORRY".

Finally, news that comes in after you start APE cannot  be retrieved.
If you want to update APE's data to include the latest  stories, type
↑C and then the system START command.  (When you do this your current
story list and your current sublist will be re-initialized to null.)